<template>
  <div class="hotelResource">
    <el-table
      :data="hotelResourceInfo"
      style="width: 100%"
      align="center"
      @row-click="jumpTO"
    >
      <el-table-column prop="name" label="价格来源" width="420">
      </el-table-column>
      <el-table-column prop="bestType" label="低价房型" width="420">
      </el-table-column>
      <el-table-column prop="price" label="最低价格/每晚">
        <template slot-scope="scope">
          <span class="lowPrice">￥{{ scope.row.price }}</span
          >&nbsp;起
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  props: ["hotelResourceInfo"],
  data() {
    return {
      // 示例数据、
      tableData: [
        {
          houseResource: "2016-05-02",
          houseType: "王小虎",
          lowPrice: "上海市普陀区",
        },
      ],
    };
  },
  methods: {
    //   点击某行触发
    jumpTO(row, column, event) {
      window.location.href = "https://www.baidu.com/";
    },
  },
};
</script>

<style lang="less" scoped>
.hotelResource {
  margin-bottom: 40px;
  /deep/.el-table__row {
    cursor: pointer;
    .lowPrice {
      color: #f90;
      font-size: 17px;
    }
  }
}
</style>